#include "Log.hpp"
#include <iostream>
#include <memory>

using namespace LogModule;

int main(){
	// std::unique_ptr<LogStrategy> strategy = std::make_unique<ConsoleLog>();
	// strategy->Synclog("hello world"); 

	// std::unique_ptr<LogStrategy> strategy = std::make_unique<FileLog>();
	// for(int i=0;i<5;i++){
	// 	std::string str = "hello world " + std::to_string(i) + " times";
	// 	strategy->Synclog(str);
	// }

	// 测试控制台日志输出
	Enable_Console();
	LOG(LogLevel::DEBUG) << "hello world " << 123456 << " " <<'a';
	LOG(LogLevel::INFO) << "all things is ok " << 777777 << " " << 'b';
	LOG(LogLevel::WARNING) << "this is a warning " << 666666 << " " << 'c';

	// 测试文件日志输出
	Enable_File();
	LOG(LogLevel::DEBUG) << "debuging " << 888888 << " " <<'a';
	LOG(LogLevel::INFO) << "all things is ok " << 777777 << " " << 'b';
	LOG(LogLevel::WARNING) << "this is a warning " << 666666 << " " << 'c';
	
	return 0;
}